package com.woniuxy.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * @Auther:Hello Mr. Guo
 * @Date:2021/5/15 17 59
 * @Description:
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString

@ApiModel(value = "ResponseEntity" , description = "返回含参数状态码")
public class ResponseEntity<T> {

    @ApiModelProperty(value = "状态码，1：成功；0：失败")
    private int code;

    @ApiModelProperty(value = "返回信息")
    private String msg;

    @ApiModelProperty(value = "返回对象")
    private T data;

    public ResponseEntity(int code,String msg){
        this.code = code;
        this.msg = msg;
    }
}
